package net.niufei.study.epatterns.transaction;


public class SessStartupBusinessInitialize implements TransactionParticipant, SessionStartup {
	
	private volatile boolean processing = false;
	
	@Override
	public void lock() throws InterruptedException {
		synchronized (this) {
			while(processing) {
				wait();
			}
			processing = true;
		}
	}

	@Override
	public void unlock() {
		synchronized (this) {
			
		}
	}

	@Override
	public Snapshot captureSnapshot() {
		// TODO Auto-generated method stub
		return null;
	}

	
	@Override
	public void restoreSnapshot(Snapshot snapshot) {
		// TODO Auto-generated method stub

	}

	@Override
	public void startup() {
		// TODO Auto-generated method stub
		
	}

}
